package com.RMP
{
    import flash.display.*;
    import flash.text.*;
    import com.greensock.*;

    public class LongText extends MovieClip
    {
        public var field:TextField;
        public var myXMLList:XML;
        var fadeSpeed:Number;
        var myRoot:MovieClip;
        var styler:StyleSheet;
        var myText:String;

        public function LongText(param1:MovieClip, param2:String) : void
        {
            myRoot = param1;
            myText = param2;
            buildStyles();
            buildField();
            return;
        }

        function buildField() : void
        {
            field.autoSize = "left";
            field.antiAliasType = AntiAliasType.ADVANCED;
            field.gridFitType = GridFitType.PIXEL;
            field.selectable = true;
            field.embedFonts = true;
            field.multiline = true;
            field.wordWrap = true;
            field.styleSheet = styler;
            field.htmlText = "<p>" + myText + "</p>";
            field.y = -1;
            return;
        }

        public function fadeInShell() : void
        {
            TweenMax.to(this, fadeSpeed, {alpha:1, overwrite:true});
            return;
        }

        function buildStyles() : void
        {
            var _loc_1:* = undefined;
            var _loc_2:* = undefined;
            var _loc_3:* = undefined;
            var _loc_4:Object = null;
            var _loc_5:Object = null;
            var _loc_6:Object = null;
            var _loc_7:Object = null;
            var _loc_8:Object = null;
            _loc_1 = new HelveticaLightEmbed().fontName;
            _loc_2 = new HelveticaBoldEmbed().fontName;
            _loc_3 = new HelveticaItalicEmbed().fontName;
            styler = new StyleSheet();
            _loc_4 = new Object();
            _loc_4.color = myRoot.coldColorHTML;
            _loc_4.fontFamily = _loc_1;
            _loc_4.leading = -4;
            _loc_5 = new Object();
            _loc_5.color = myRoot.coldColorHTML;
            _loc_5.textDecoration = "none";
            _loc_6 = new Object();
            _loc_6.color = myRoot.hotColorHTML;
            _loc_6.textDecoration = "none";
            _loc_7 = new Object();
            _loc_7.color = myRoot.coldColorHTML;
            _loc_7.fontFamily = _loc_2;
            _loc_8 = new Object();
            _loc_8.color = myRoot.coldColorHTML;
            _loc_8.fontFamily = _loc_3;
            styler.setStyle(".myItalic", _loc_8);
            styler.setStyle("p", _loc_4);
            styler.setStyle("a:link", _loc_5);
            styler.setStyle("a:hover", _loc_6);
            styler.setStyle(".mybold", _loc_7);
            return;
        }

    }
}
